package com.jk.controller;

import com.jk.dto.TreeBean;
import com.jk.pojo.ResponseResult;
import com.jk.service.TreeBeanServiceFegin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/12 14:22
 */
@Slf4j
@Api(tags = "知识点管理")
@RestController
@RequestMapping(value = "tree")
public class TreeBeanController {
    @Autowired
    private TreeBeanServiceFegin treeBeanServiceFegin;

    @ApiOperation(value = "知识点树查询",httpMethod = "POST")
    @RequestMapping(value = "findTreeBean")
    public ResponseResult<List<TreeBean>> findTreeBean(@RequestBody TreeBean treeBean) {
        return new ResponseResult<>(200,"查询成功",treeBeanServiceFegin.findTreeBean(treeBean));
    }
}
